package com.mall.huohuo.datasource.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 广告表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tbl_advertise")
public class TblAdvertise {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 广告名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 广告默认展示的位置 枚举维护
     */
    @TableField(value = "position")
    private Integer position;

    /**
     * 图片地址
     */
    @TableField(value = "image_url")
    private String imageUrl;

    /**
     * 广告的开始时间
     */
    @TableField(value = "active_time")
    private LocalDateTime activeTime;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private LocalDateTime endTime;

    /**
     * 是否上线
     */
    @TableField(value = "is_online")
    private Boolean isOnline;

    /**
     * 排序序号
     */
    @TableField(value = "sort_num")
    private Integer sortNum;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(value = "ref_category_id")
    private Long refCategoryId;

    public static final String COL_ID = "id";

    public static final String COL_NAME = "name";

    public static final String COL_POSITION = "position";

    public static final String COL_IMAGE_URL = "image_url";

    public static final String COL_ACTIVE_TIME = "active_time";

    public static final String COL_END_TIME = "end_time";

    public static final String COL_IS_ONLINE = "is_online";

    public static final String COL_SORT_NUM = "sort_num";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";
    public static final String COL_REF_CATEGORY_ID = "ref_category_id";
}
